﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Toenda.Foundation.IO.Compression {
	/// <summary>
	/// Implements the event arguments for the calculation finished event
	/// </summary>
	public class CompressionFinishedEventArgs : EventArgs {
		/// <summary>
		/// Get or set that indicates if the calculation was successfull
		/// </summary>
		public bool Succeed { get; set; }

		/// <summary>
		/// Gets or sets the message
		/// </summary>
		public string Message { get; set; }

		/// <summary>
		/// Gets or sets the complete calculation time
		/// </summary>
		public TimeSpan CompressionTime { get; set; }

		/// <summary>
		/// Creates a new instance of <see cref="CompressionFinishedEventArgs"/>
		/// </summary>
		public CompressionFinishedEventArgs() {
		}

		/// <summary>
		/// Creates a new instance of <see cref="CompressionFinishedEventArgs"/>
		/// </summary>
		/// <param name="succeed">If the calculation was successfull, this returns true, otherwise false.</param>
		/// <param name="message">The message of this last step.</param>
		/// <param name="compressionTime">The loading time of this last step.</param>
		public CompressionFinishedEventArgs(bool succeed, string message, TimeSpan compressionTime) {
			this.Succeed = succeed;
			this.Message = message;
			this.CompressionTime = compressionTime;
		}
	}
}
